<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions">

    <ui:composition template="template.xhtml">
        <ui:define name="title"><h:outputText value="" /></ui:define>
        <ui:define name="body">
            <h:form>
                <br/><br/>
                <div align="center">
                    <h:panelGrid columns="2" rowClasses="rowRoxo" styleClass="tabelaRich500"
                                 columnClasses="col30Right, alignCenter" >
                        <h:graphicImage id="imageAcesso" height="25" value="../imagens/plus.png" />
                        <h:outputText value="" styleClass="titulosTabelas"/>
                    </h:panelGrid>
                    <h:panelGrid columns="1" styleClass="tabelaRich500" columnClasses="alignCenter" >
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['id.usuario']}: " />
                            <h:inputText id="id" readonly="true" value="#{usuarioBusiness.usuario.id}" required="true"/>
                        </h:panelGrid>
                        <h:message for="id" styleClass="errorMessage"/>
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['nome.usuario']}:" />
                            <h:inputText id="nome" value="#{usuarioBusiness.usuario.nome}" required="true"
                                         validator="#{usuarioBusiness.validaNome}"
                                         requiredMessage="#{msgs['nome.usuario']}" />
                        </h:panelGrid>
                        <h:message for="nome" styleClass="errorMessage"/>
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['telefone.usuario']}:" />
                            <h:inputText id="telefone" value="#{usuarioBusiness.usuario.telefone}" required="true"
                                         validator="#{usuarioBusiness.validaTelefone}"
                                         requiredMessage="#{msgs['telefone.usuario']}" />
                        </h:panelGrid>
                        <h:message for="telefone" styleClass="errorMessage"/>
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['cpf.usuario']}:" />
                            <h:inputText id="cpf" value="#{usuarioBusiness.usuario.cpf}" required="true"
                                         validator="#{usuarioBusiness.validaCpf}"
                                         requiredMessage="#{msgs['cpf.usuario']}" />
                        </h:panelGrid>
                        <h:message for="cpf" styleClass="errorMessage"/>
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['email.usuario']}:" />
                            <h:inputText id="email" value="#{usuarioBusiness.usuario.email}" required="true"
                                         validator="#{usuarioBusiness.validaEmail}"
                                         requiredMessage="#{msgs['email.usuario']}" />
                        </h:panelGrid>
                        <h:message for="email" styleClass="errorMessage"/>
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['login.usuario']}:" />
                            <h:inputText id="login" value="#{usuarioBusiness.usuario.login}" required="true"
                                         validator="#{usuarioBusiness.validaLogin}"
                                         requiredMessage="#{msgs['login.usuario']}" />
                        </h:panelGrid>
                        <h:message for="login" styleClass="errorMessage"/>
                        
                        <h:panelGrid columns="2" styleClass="tabelaRich500" columnClasses="col166Right, col250Left" >
                            <h:outputText styleClass="labels" value="#{msgs['senha.usuario']}:" />
                            <h:inputText id="senha" value="#{usuarioBusiness.usuario.senha}" required="true"
                                         requiredMessage="#{msgs['senha.usuario']}" />
                        </h:panelGrid>
                        <h:message for="senha" styleClass="errorMessage"/>

                        

                    </h:panelGrid>
                    <br/>
                    <h:commandButton value="#{msgs['system.salvar']}" action="#{usuarioBusiness.atualizarUsuario()}" />
                    <h:outputText value="  " escape="false" />
                    <h:commandButton value="#{msgs['system.limpar']}" type="reset" />
                </div>
            </h:form>
            
            
        </ui:define>
        
        
    </ui:composition>
    

</html>
